作者:springzhe7943 | 来源:互联网 | 2023-01-22 18:11
IcouldntfinddocumentationonanequivalentofJavasfinalinPython,istheresuchathing?我找不
I couldn't find documentation on an equivalent of Java's final
in Python, is there such a thing?
我找不到关于Java的最终版本的文档,是不是有这样的东西?
I'm creating a snapshot of an object (used for restoration if anything fails); once this backup variable is assigned, it should not be modified -- a final-like feature in Python would be nice for this.
我正在创建一个对象的快照(如果有任何失败则用于恢复);一旦分配了这个备份变量,就不应该修改它 - Python中的类似最终功能对此很有用。
8 个解决方案